<?php

class MainView extends RegularView
{
	protected function title() { return ""; }
	
	protected function name() { return "main"; }
	
	protected function body()
	{
		$this->loginForm();
		?>
		<br />
		<?php
		$this->registerForm();
	}
	
	private function loginForm()
	{
	?>
	<form action = "<?php $this->url(array("action" => "login", "view" => "login")); ?>" method = "POST">
		<table class = "form_table">
			<tr><td><?php TextManager::i()->text("TITLE_PLAYER_NAME"); ?></td><td><input type = "text" name = "name" /></td></tr>
			<tr><td><?php TextManager::i()->text("TITLE_PASSWORD"); ?></td><td><input type = "password" name = "password" /></td></tr>
			<tr><td colspan = "2" class = "btn"><input type = "submit" value = "<?php TextManager::i()->text("LOGIN"); ?>" /></td></tr>
		</table>
	</form>
	<?php
	}
	
	private function registerForm()
	{
	?>
	<form action = "<?php $this->url(array("action" => "register", "view" => "register")); ?>" method = "POST">
		<table class = "form_table">
			<tr><td class = "title" colspan = "2"><?php TextManager::i()->text("REGISTER"); ?></td></tr>
			<tr><td><?php TextManager::i()->text("TITLE_PLAYER_NAME"); ?></td><td><input type = "text" name = "name" /></td></tr>
			<tr><td><?php TextManager::i()->text("E-mail"); ?></td><td><input type = "text" name = "mail" /></td></tr>
			<tr><td><?php TextManager::i()->text("TITLE_PASSWORD"); ?></td><td><input type = "password" name = "password" /></td></tr>
			<tr><td><?php TextManager::i()->text("TITLE_REPEAT_PASSWORD"); ?></td><td><input type = "password" name = "repeat_password" /></td></tr>
			<tr><td colspan = "2" class = "btn"><input type = "submit" value = "<?php TextManager::i()->text("REGISTER"); ?>" /></td></tr>
		</table>
	</form>
	<?php
	}
	
}

?>